﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fated.Character.ChartGeneration {
    class Pluto : Planet{
       
        private static float toMars = 0;
        private static float toMoon = 0;
        private static float toVenus = 0;
        private static float toMercury = 0;

        public static void clear() {
            toMars = 0;
            toMoon = 0;
            toVenus = 0;
            toMercury = 0;
        }
        public static void addAspect(PlanetNames p, Aspect.AspectType a) {
            if (p == PlanetNames.Mars) {
                if (a == Aspect.AspectType.Trine) toMars = 1.5f;
                if (a == Aspect.AspectType.Sextile) toMars = 1.25f;
                if (a == Aspect.AspectType.Conjunct) {
                    if (yang) toMars = 1.25f; else toMars = -.25f;
                }
                if (a == Aspect.AspectType.Square) toMars = -.25f;
                if (a == Aspect.AspectType.Opposite) toMars = 2.5f;

            } else if (p == PlanetNames.Moon) {
                if (a == Aspect.AspectType.Trine) toMoon = 1.5f;
                if (a == Aspect.AspectType.Sextile) toMoon = 1.25f;
                if (a == Aspect.AspectType.Conjunct) {
                    if (yang) toMoon = 1.25f; else toMoon = -.25f;
                }
                if (a == Aspect.AspectType.Square) toMoon = -.25f;
                if (a == Aspect.AspectType.Opposite) toMoon = -.5f;

            } else if (p == PlanetNames.Venus) {
                if (a == Aspect.AspectType.Trine) toVenus = 1.5f;
                if (a == Aspect.AspectType.Sextile) toVenus = 1.25f;
                if (a == Aspect.AspectType.Conjunct) {
                    if (yang) toVenus = 1.25f; else toVenus = -.25f;
                }
                if (a == Aspect.AspectType.Square) toVenus = -.25f;
                if (a == Aspect.AspectType.Opposite) toVenus = -.5f;
            } else if (p == PlanetNames.Mercury) {
                if (a == Aspect.AspectType.Trine) toMercury = 1.5f;
                if (a == Aspect.AspectType.Sextile) toMercury = 1.25f;
                if (a == Aspect.AspectType.Conjunct) {
                    if (yang) toMercury = 1.25f; else toMercury = -.25f;
                }
                if (a == Aspect.AspectType.Square) toMercury = -.25f;
                if (a == Aspect.AspectType.Opposite) toMercury = -.5f;
            }
        }
        public static void getStats(ref float[] stats) {
            if (toMars != 0){
                float stat = stats[(int)Chart.Stats.Body];
                stats[(int)Chart.Stats.Body] += (stat * toMars);
            }
            if (toMercury != 0){
                float stat = stats[(int)Chart.Stats.Mind];
                stats[(int)Chart.Stats.Mind] += (stat * toMercury);
            }
            if (toVenus != 0){
                float stat = stats[(int)Chart.Stats.Social];
                stats[(int)Chart.Stats.Social] += (stat * toVenus);
            }
            if (toMoon != 0){
                float stat = stats[(int)Chart.Stats.Spirit];
                stats[(int)Chart.Stats.Spirit] += (stat * toMoon);
            }
        }
    }
}
